package com.easybuilder.blog.dao;

import com.easybuilder.common.base.dao.BaseDao;
import com.easybuilder.blog.entity.BlogComment;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import tk.mybatis.mapper.common.ExampleMapper;
import org.springframework.stereotype.Repository;

import java.util.List;


@Repository
public interface BlogCommentDao extends BaseDao<BlogComment>, ExampleMapper<BlogComment> {

    /** 统计数量 */
    @Select("select count(1) from blog_comment union all select count(1) from blog_comment where create_time like '${date}%'")
    List<Integer> countComment(@Param("date") String date);
}